-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Java: Add manual overlay annotations & discard predicates #19813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: kaspersv/overlay-java-annotations
Are you sure you want to change the base?
Java: Add manual overlay annotations & discard predicates #19813
Conversation
6f5bc41
to
8672313
Compare
8672313
to
db52a3c
Compare
// bodies for dependencies. To approximate fully extracted files in | ||
// the overlay, we restrict attention to files that contain an expression | ||
// with an enclosing callable. | ||
exists(@expr e | callableEnclosingExpr(e, _) and file = getRawFile(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smowton suggested in the internal issue for "Java overlay: Low-level accuracy issues" to use the numlines
table instead of callableEnclosingExpr
to identify non-skeleton files.
I'm fine with postponing that change (and its evaluation) to a follow-up PR.
@@ -26,6 +26,7 @@ import semmle.code.java.KotlinType | |||
import semmle.code.java.Member | |||
import semmle.code.java.Modifier | |||
import semmle.code.java.Modules | |||
import semmle.code.java.Overlay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import will bring four top-level predicates into the global scope, visible in autocomplete everywhere. I think this would be better as a private import
in each of the files that define a discard predicate.
exists(@member m | file = getRawFile(m) and hasJavadoc(m, d)) | ||
} | ||
|
||
/** Discard javadoc entities in files fully extracted in the overlay. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we also have discarding rules for comments that aren't Javadoc?
No description provided.